/*  Copyright (c) 2020 - ~, WANGXI
 *  
 *  NS CORE QUEUE EXPAND TEST MYFIFO HEAD FILE
 * 
 *  Clone from https://gitee.com/WangXi_Chn/ns2_modulelib
 *  Note in https://www.yuque.com/wangxi_chn
 *  
 *  Change Logs:
 *  Date           Author       Notes			Mail
 *  2020-12-15     WangXi   	first version	WangXi_Chn@foxmail.com
*/

#ifndef ns_dtrr_queue_h
#define ns_dtrr_queu_h

#include <string.h>
#include "queue.h"
#include "address.h"
#include "tclcl.h"

// 队列的C++对应的类命名为DtRrQueue，继承于Queue类

class DtRrQueue:public Queue
{
public:
    DtRrQueue(){

        //队列中的两个逻辑FIFO队列
        q1_ = new PacketQueue;
        q2_ = new PacketQueue;
        pq_ = q1_;
        deq_turn_ = 1;
    }
protected:
    void enque(Packet*);
    Packet* deque();
    PacketQueue* q1_;   //First FIFO queue
    PacketQueue* q2_;   //Second FIFO queue
    int deq_turn_;      //1 for First queue 2 for Second
};


#endif

/************************ (C) COPYRIGHT 2020 WANGXI **************END OF FILE****/
